package com.ce.common.db.base;

/**
 * 数据库中表或者视图的对象
 * @author yangenxiong
 *
 */
public class DataObject {

	//数据库中表的名字
	private String name;
	
	//表的类型
	private String type;

	public DataObject() {
		super();
	}

	public DataObject(String name, String type) {
		super();
		this.name = name;
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public boolean equals(Object obj) {
		try {
			DataObject data = (DataObject)obj;
			if (data.getName().equals(this.name)) {
				return true;
			}
		} catch (Exception e) {
			return false;
		}
		return false;
	}
}
